package ru.ifmo.math.matrix;

/**
 * @author avhaliullin
 */
public class Grid {
    private final Node first;

    public Grid(Node first) {
        this.first = first;
    }

    public Node getFirst() {
        return first;
    }

    public class Node {
        public final Node onZero;
        public final Node onOne;

        public Node(Node onZero, Node onOne) {
            this.onZero = onZero;
            this.onOne = onOne;
        }

        public boolean isLast() {
            return onOne == null && onZero == null;
        }
    }
}
